package org.megha.blog.example.part7;

public class Main {

	public static void main(String args[]) {

		Cat cat1 = new Cat();
		Tiger tiger1 = new Tiger();
		Cat cat2 = tiger1;

		System.out.println(cat1.whoAmI());
		// prints "I am a cat."

		System.out.println(tiger1.whoAmI());
		// prints "I am a tiger."

		System.out.println(cat2.whoAmI());
		// prints "I am a tiger."
	}

}
